<template>
  <el-container id="content-manage">
    <el-main style="overflow: hidden">
      <Header
        v-if="$store.state.dashboard.isContentwrite"
        :count-pic="countPic"
        :pic-search-options="params"
        :is-batch-header-show="isBatchHeaderShow"
        @getList="getList"
      ></Header>
      <el-main>
        <List
          ref="channel"
          :dataList="dataList"
          :pic-search-options="params"
          @getList="getList"
        ></List>
        <el-dialog
          width="0"
          style="z-index: 10"
          :close-on-click-modal="false"
          :show-close="false"
          :modal-append-to-body="false"
        ></el-dialog>
      </el-main>
      <el-footer style="height: auto">
        <slot name="modal-footer"></slot>
      </el-footer>
    </el-main>
  </el-container>
</template>
<script>
import * as businessManageApi from "@/api/request/businessManageApi";
import Header from "./header";
import List from "./list";
export default {
  components: {
    Header,
    List,
  },
  data() {
    return {
      id: null,
      page: {
        pageIndex: 1,
        pageSize: 10,
      },
      params: {
        Status: "",
        ProductCode: "",
        BusStartTime: "",
        BusEndTime: "",
        pageIndex: 1,
        pageSize: 10,
      },
      countPic: 0,
      idsList: [],
      dataList: {},
      treeResult: null,
      treeTotal: {},
    };
  },
  mounted() {
    this.getList();
  },
  created() {},
  methods: {
    // 请求列表数据
    async getList() {
      this.$Loading.show();
      let { data } = await businessManageApi.getList(this.params);
      this.$Loading.hide();
      this.dataList = data;
    },
  },
  computed: {
    isBatchHeaderShow() {
      return this.idsList.length > 0 ? true : false;
    },
  },
  watch: {},
};
</script>

<style lang="scss" scoped>
// @import "../style/contentDetail";
.el-dialog__wrapper /deep/ .el-dialog {
  margin-top: 70px !important;
}
.uploadImgDialog /deep/ .el-dialog__header {
  padding: 0 20px;
  height: 44px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .el-dialog__headerbtn {
    top: 7px;
  }
}
</style>
